package gg.learn.innerclass;
class StringHolder {
    private String value;

    public StringHolder(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return value;
    }
}


public class Ex4 {
    public static void main(String[] args) {
        Sequence sequence = new Sequence(3);
        for(int i =0;i<3;i++) {
            sequence.add(i+"+");
        }
        Selector selector = sequence.selector();
        while(selector.end()){
            System.out.println(selector.current());
            selector.next();
        }
    }

}